package exp4;

import exp2.Point;


public class Circle extends exp2.Circle {
    public Circle() {
        super();
    }

    public Circle(int x, int y, int r) {
        super(x, y, r);
    }

    public Circle(Point c, int radius) {
        super(c, radius);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;
        if (obj instanceof exp2.Circle c) {
            return getRadius() == c.getRadius() && getCenter().getX() == c.getCenter().getX() && getCenter().getY() == c.getCenter().getY();
        } else {
            return false;
        }
    }

    @Override
    public String toString() {
        return "Circle{" +
                "center=" + getCenter().toString() +
                ", radius=" + getRadius() +
                '}';
    }
}